//
//#ifndef PROJECTZ_NUSER_NCOMMAND_CS_REQ_USER_INFO_INVEN_BAG_H_
//#define PROJECTZ_NUSER_NCOMMAND_CS_REQ_USER_INFO_INVEN_BAG_H_
//
//#include "../../engine.h"
//
//#include "../../User.h"
//#include "../../Data.h"
//#include "../../game/game.h"
//
//#include "../../NLogic/Bag.h"
//#include "../../NLogic/Item.h"
//
//namespace ProjectZ { namespace NCommand { namespace NWorld {
//
//class CS_REQ_USER_INFO_INVEN_BAG
//{
//public:
//	static void OnExecute(User * pUser, ::Network::Packet * pPacket)
//	{
//		STRESSLOG("[CHANNEL] CS_REQ_USER_INFO_INVEN_BAG::ONEXECUTE");
//
//		PREPARE_PACKET;
//
//		int slotnumber = 0;
//		int bag_type = 0;
//		pPacket->ParseMsg("%c%c", & slotnumber, & bag_type);
//
//		NLogic::Bag * pBag = pUser->GetBag(static_cast<INVEN_BAG_TYPE>(bag_type));
//		if (NULL == pBag)
//		{
//			DEBUGLOG("CS_REQ_USER_INFO_INVEN_BAG BAG IS NULL bag_type : %d", bag_type);
//			return;
//		}
//
//
//		::Network::Packet * pAck = ::Network::GETPACKETPOOL()->SEND_NEW();
//		pAck->MsgCat("%d%c", pUser->GetGID(), bag_type);
//		pAck->MsgCat("%c", pBag->HasItemCount());
//
//		//NLogic::Bag::ITEMVECTOR & clsItemVector = pBag->GetItemVector();
//
//		for (int i = 0; i < NLogic::Bag::s_MAX; ++i)
//		{
//			if (false == pBag->IsExistItem(i))
//				continue;
//
//			NLogic::Item * pItem = pBag->GetItemFromIndex(i);
//			pAck->MsgCat("%c", pItem->GetData().bag_slot_number);
//			pAck->MsgCat("%8d", pItem->GetItemSeq());
//			pItem->WriteToPacket(pAck);
//		}
//
//		pAck->MakePacket(CMD_SC_REQ_USER_INFO_INVEN_BAG);
//		pUser->Send(pAck);
//	}
//};
//
//} /*NWorld*/ } /*NCommand*/ } /*ProjectZ*/
//
//
//#endif /* PROJECTZ_NUSER_NCOMMAND_CS_REQ_USER_INFO_INVEN_BAG_H_ */
